package com.qqtech.qquan.homemaking.service;

import java.util.List;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.qqtech.core.frame.dao.BaseDao;
import com.qqtech.core.frame.service.BaseServiceImpl;
import com.qqtech.qquan.homemaking.dao.HomemakingItemDao;
import com.qqtech.qquan.homemaking.model.*;

@Service
public class HomemakingItemServiceImpl extends BaseServiceImpl<HomemakingItem>
		implements HomemakingItemService {
	public static final Logger log = LoggerFactory.getLogger(HomemakingItemServiceImpl.class);
	
	@Resource
	private HomemakingItemDao homemakingItemDao;

	@Override
	protected BaseDao<HomemakingItem> getBaseDao() {
		return homemakingItemDao;
	}

	@Override
	public List<HomemakingItemVo> findByBaseId(Integer baseId, Integer status) {
		if (baseId == null) {
			return null;
		}
		HomemakingItemQuery q = new HomemakingItemQuery();
		q.setBaseId(baseId);
		q.setStatus(status);
		return homemakingItemDao.queryList(q);
	}
	
}